package cn.net.shuxing.yifu.common.service;

import cn.net.shuxing.yifu.common.bean.ContentSys;
import cn.net.shuxing.yifu.common.constant.OssConstant;
import org.springframework.beans.factory.annotation.Autowired;

public class ContentCommonService {

    @Autowired
    private OssCommonService ossCommonService;

    public String parseLink(String link)
    {
        String prefix = "inlineLink-";
        String url = link;
        if (link.startsWith(prefix))
        {
            String objectName = link.substring(prefix.length());
            url = ossCommonService.getUrl(OssConstant.ossBucketName,objectName);
        }
        return url;
    }

//    public String dealInlineLink(String link)
//    {
//        String url = parseLink(link);
//        ossCommonService.getFileContent();
//    }
}
